// License Notification
//======================================================
// Copyright (c) 2010 Channel Intelligence Inc.
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// which accompanies this distribution, and is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// ======================================================


namespace CIP4.RulesEngine
{
    public enum BooleanOperatorsEnum
    {
        /// <summary> 
        /// Equals operator
        /// </summary>
        EQL = 0,
        /// <summary> 
        /// Not Equals operator
        /// </summary>
        NEQ = 1,
        /// <summary> 
        /// Greater than operator
        /// </summary>
        GTR = 2,
        /// <summary> 
        /// Less than operator
        /// </summary>
        LSS = 3,
        /// <summary> 
        /// Greater than or equal operator
        /// </summary>
        GEQ = 4,
        /// <summary> 
        /// Less than or equal operator
        /// </summary>
        LEQ = 5,
        /// <summary> 
        /// Contains operator - applies only to strings - true if the Left Atom contains the contents of the Right Atom - the match is case insensitive
        /// </summary>
        CONTAINS = 7,
        /// <summary> 
        /// Starts with operator - applies only to strings - true if the Left Atom starts with the contents of the Right Atom - the match is case insensitive
        /// </summary>
        STARTSWITH = 9,
        /// <summary> 
        /// Ends with operator - applies only to strings - true if the Left Atom ends with the contents of the Right Atom  - the match is case insensitive
        /// </summary>
        ENDSWITH = 10,
        /// <summary> 
        /// Like Match operator - applies only to strings - true if any string in the Left Atom matches the regular expression pattern specified in the Right Atom
        /// </summary>
        LIKEMATCH = 11,
        /// <summary> 
        /// Exact Match operator - applies only to strings - true if the entire string in the Left Atom matches the regular expression pattern specified in the Right Atom
        /// </summary>
        EXACTMATCH = 13,
        /// <summary> 
        /// Has a value operator - returns true if the right operand has a value - this is a unary operator the Left atom must not have a value
        /// </summary>
        HASAVALUE = 12,
        /// <summary>
        /// The precision test operator - the number of digits to the right of the decimal point in the left operand must be equal to the number in the right operand
        /// </summary>
        PRECISIONTEST = 14,
        /// <summary>
        /// The max length test operator - the number of characters in the left operand must be less or equal to than the number in the right operand - if the left operand is a number any periood character ('.') will be ignored
        /// </summary>
        MAXLENGTHTEST = 15,
        /// <summary>
        /// The min length test operator - the number of characters in the left operand must be greater than or equal to the number in the right operand - if the left operand is a number any periood character ('.') will be ignored
        /// </summary>
        MINLENGTHTEST = 16,
        /// <summary> 
        /// Valid URI operator - true if the target in the Right Atom is a valid URI -  uses the CLR Uri class to do the validate
        /// </summary>
        VALIDURI = 18,
        /// <summary> 
        /// Valid ISBN operator - true if the target in the Right Atom is a valid ISBN 
        /// uses the following regular expression for teh format
        ///     (?=[-0-9xX ]{13}$)(?:[0-9]+[- ]){3}[0-9]*[xX0-9]$
        /// uses the following formula for the check digit
        ///     For each of the first 9 digits, multiply the digit by its position in 
        ///     the ISBN - so, multiply digit 1 by 1, digit 2 by 2, digit 3 by 3, and 
        ///     so on to digit 9 * 9. Add the lot of them up. Take the result mod 11. 
        ///     This gives you your last digit - with the caveat that if the result mod 
        ///     11 is 10, the last digit is X.
        /// </summary>
        VALIDISBN = 19,
        /// <summary> 
        /// Valid ISBN operator - true if the target in the Right Atom is a valid UPC 
        /// </summary>
        VALIDUPC = 20,
        /// <summary> 
        /// Contains html operator - true if the target in the Right Atom contains any html elements
        /// </summary>
        CONTAINSHTML = 21,
        /// <summary>
        /// ALL operator - true if the given expression is true for all the given values. The first 
        /// parameter must be a list of values, the second parameter must be a boolean expression. 
        /// The variable 'each' can be used to access the current value which may be either a simple
        /// value or a compound value.
        /// </summary>
        ALL = 22,
        /// <summary>
        /// ALL operator - true if the given expression is true for all the given values. The first 
        /// parameter must be a list of values, the second parameter must be a boolean expression. 
        /// The variable 'each' can be used to access the current value which may be either a simple
        /// value or a compound value.
        /// </summary>
        SOME = 23,

        INVALIDOP = 24

    }
}
